﻿using System;
using System.Collections.Generic;
using System.Linq.Expressions;
using Equation.Enterprise.Framework.ApplicationServices;

namespace ENail.Domain.Core.Contract.Services
{
    public interface ICategoryService : IApplicationService
    {
        /// <summary>
        /// Helps view all categories on list view
        /// </summary>
        /// <returns>List of all categories</returns>
        IList<Category> GetAllCategories();

        /// <summary>
        /// Helps view categories for search view
        /// </summary>
        /// <param name="where">Lambda condition to get categories</param>
        /// <returns></returns>
        IList<Category> GetCategories(Expression<Func<Category, bool>> where);

        /// <summary>
        /// Helps view active categories only
        /// </summary>
        /// <returns>All active categories</returns>
        IList<Category> GetAllActiveCategories();

        /// <summary>
        /// Helps view details of an category
        /// </summary>
        /// <param name="id">Identity of category</param>
        /// <returns>Category with specified identity</returns>
        Category GetCategory(int id);

        /// <summary>
        /// Insert an category from view
        /// </summary>
        /// <param name="category">Category to be inserted</param>
        /// <returns>Number of records affected</returns>
        int InsertCategory(Category category);

        /// <summary>
        /// Update an category from view
        /// </summary>
        /// <param name="category">Category to be updated</param>
        /// <returns>Number of records affected</returns>
        int UpdateCategory(Category category);

        /// <summary>
        /// Helps to inactive an category
        /// </summary>
        /// <param name="category">Category to be inactive</param>
        /// <returns>Number of records affected</returns>
        int DeActivateCategory(Category category);
    }
}
